﻿<%@ Control Language="C#" AutoEventWireup="true" EnableViewState="false" Inherits="YAF.Controls.ForumActiveDiscussion"
    CodeBehind="ForumActiveDiscussion.ascx.cs" %>
<%@ Import Namespace="YAF.Types.Interfaces" %>
<asp:UpdatePanel ID="UpdateStatsPanel" runat="server" UpdateMode="Conditional">
    <ContentTemplate>
        <table border="0" class="content activeDiscussionContent hoandd-table" cellspacing="1" cellpadding="0" width="100%" >
            <tr>
                <td class="header1" colspan="3" style="padding: 9px ! important;">
                    <YAF:CollapsibleImage ID="CollapsibleImage" runat="server" BorderWidth="0" Style="vertical-align: middle"
                        PanelID='ActiveDiscussions' AttachedControlID="ActiveDiscussionPlaceHolder" />&nbsp;&nbsp;<YAF:LocalizedLabel
                            ID="ActiveDiscussionHeader" runat="server" LocalizedTag="ACTIVE_DISCUSSIONS" />
                </td>
            </tr>
            <tr>
                <td rowspan="2" style="width: 60%; border-right: 1px dotted #aaa">
            <asp:PlaceHolder runat="server" ID="ActiveDiscussionPlaceHolder">
                <asp:Repeater runat="server" ID="LatestPosts" OnItemDataBound="LatestPosts_ItemDataBound">
                    <HeaderTemplate>
                        <table class="content activeDiscussionContent sub-hoandd-table">
                        <tr class="header2">
                            <th class="post">Chủ đề</th>
                            <th class="post">Ngày gửi</th>
                            <th class="post">Người gửi</th>
                        </tr>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <tr>
                            <td class="post" style="padding-left: 10px">
                                <asp:Image ID="NewPostIcon" runat="server" Style="border: 0; width: 16px; height: 16px" />
                                <strong>
                                    <asp:HyperLink ID="TextMessageLink" runat="server" /></strong>
                                
                            </td>
                            <td class="post" style="text-align: left;">
                                <YAF:DisplayDateTime ID="LastPostDate" runat="server" Format="BothTopic" />
                            </td>
                            <td class="post" style="padding-left: 10px; text-align: left">
                                <YAF:UserLink ID="LastUserLink" runat="server" />
                            </td>
                        </tr>
                    </ItemTemplate>
                    <FooterTemplate>
                        </table>
                    </FooterTemplate>
                </asp:Repeater>
                <%-- <tr>
                    <td class="footer1" align="right" colspan="2">
                        <YAF:RssFeedLink ID="RssFeed" runat="server" FeedType="LatestPosts"  TitleLocalizedTag="RSSICONTOOLTIPACTIVE" />&nbsp; 
                        <YAF:RssFeedLink ID="AtomFeed" runat="server" FeedType="LatestPosts" IsAtomFeed="true" ImageThemeTag="ATOMFEED" TextLocalizedTag="ATOMFEED" TitleLocalizedTag="ATOMICONTOOLTIPFORUM" />                           
                    </td>
                </tr>--%>
            </asp:PlaceHolder>
                    </td>
                <td style="width: 15%">
                    <asp:Repeater runat="server" ID="TopPoster" OnItemDataBound="Repeater1ItemDataBound">
                            <HeaderTemplate>
                                <table class="content activeDiscussionContent sub-hoandd-table">
                                    <tr class="header2">
                                        <th colspan="2">Top trả lời</th>
                                    </tr>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <tr>
                                    <td>  <YAF:UserLink ID="UserProfileLink" runat="server" IsGuest="False" ReplaceName='<%# this.Eval("DisplayName").ToString() %>'  UserID='<%# this.Eval("UserID").ToType<int>() %>' Style="" /></td>
                                    <td>
                                        <span>
                                            <%# this.Eval("NumPosts").ToString() %>
                                        </span>
                                    </td>
                                </tr>
                            </ItemTemplate>
                            <FooterTemplate>
                                </table>
                            </FooterTemplate>
                        </asp:Repeater>
                </td>
                <td>
                    <asp:Repeater runat="server" ID="NewestMembers" >
                             <HeaderTemplate>
                                <table class="content activeDiscussionContent sub-hoandd-table">
                                    <tr class="header2">
                                        <th colspan="2">Thành viên mới</th>
                                    </tr>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <tr>
                                    <td>  <YAF:UserLink ID="UserProfileLink" runat="server" IsGuest="False" ReplaceName='<%# this.Eval("DisplayName").ToString() %>'  UserID='<%# this.Eval("UserID").ToType<int>() %>' Style="" />
                                        </td>
                                    <td>
                                        <span><%# this.Eval("Joined", "{0:dd/M/yyyy}").ToString() %></span>
                                    </td>
                                </tr>
                            </ItemTemplate>
                            <FooterTemplate>
                                </table>
                            </FooterTemplate>
                        </asp:Repeater>
                </td>
                </tr>
            <tr>
                <td colspan="2">
                    <asp:Repeater runat="server" ID="MostViews" OnItemDataBound="MostViews_ItemDataBound" >
                             <HeaderTemplate>
                                <table class="content activeDiscussionContent sub-hoandd-table">
                                    <tr class="header2"> 
                                        <th colspan="2">Đọc nhiều nhất</th>
                                    </tr>
                            </HeaderTemplate>
                            <ItemTemplate>
                                <tr>
                                    <td>
                                        <asp:HyperLink ID="TextMessageLink" runat="server" />  
                                        </td>
                                    <td>
                                        <span><%# this.Eval("Views").ToString() %></span>
                                    </td>
                                </tr>
                            </ItemTemplate>
                            <FooterTemplate>
                                </table>
                            </FooterTemplate>
                        </asp:Repeater>
                </td>
            </tr>
        </table>
        
    </ContentTemplate>
</asp:UpdatePanel>
